const messageList=require('../data/Lists')
const connectLi=require('../data/coList')
const { Controller } = require('egg');

class HomeController extends Controller {
  async listM() {
    const { ctx } = this;
    try{
      const list=messageList
      ctx.body = {
        code: 200,
        msg: '请求成功',
        list
      }
    }catch{
      ctx.body={
        code:500,
        msg:'系统错误',
        data:null
      }
    }
  }
  async connectList(){
    const { ctx } = this;
    try{
      const list=connectLi
      ctx.body = {
        code: 200,
        msg: '请求成功',
        list
      }
    }catch{
      ctx.body={
        code:500,
        msg:'系统错误',
        data:null
      }
    }
  }
}

module.exports = HomeController;
